#include "StdAfx.h"
#include "AudioOut.h"

AudioOut* AudioOut::Instance(HWND* hWnd, HINSTANCE* hInst)
{
	if(_pthis == NULL)
	{
		if(hWnd == 0 && hInst == 0)
		{
			return NULL;
		}
		_pthis = new AudioOut(*hWnd, *hInst);
	}
	return _pthis;
}

AudioOut::~AudioOut()
{
}

AudioOut::AudioOut(HWND hWnd, HINSTANCE hInst)
{
	DirectSoundCreate8(NULL, &m_pDirectSound, NULL);
	m_pDirectSound->SetCooperativeLevel(hWnd, DSSCL_EXCLUSIVE);
	Initialize();
}

void AudioOut::Initialize()
{
}